import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            System.out.println("input:");
            String str = in.nextLine();
            System.out.println(func(str));
        }
    }
    public static String func(String str) {
        System.out.println("func执行了");
        boolean[] flg=new boolean[127];
        StringBuilder stringBuilder=new StringBuilder();
        for(int i=0;i<str.length();i++){
            char ch=str.charAt(i);
            if(flg[ch]==false){
                stringBuilder.append(ch);
                flg[ch]=true;
            }
        }
        return stringBuilder.toString();
    }
}
